interface IState {
  [propName: string]: any
}

export default {
  setConsName(state: IState, consName: string) {
    state.consName = consName;
  },
  setField(state: IState, field: string) {
    state.field = field;
  },
  setErrorCode(state: IState, errorCode: number) {
    state.errorCode = errorCode
  },
  setData(state: IState, data: object) {
    state[state.field] = data;
  }
}